{{include template('public/header','admin')}}
<style>
    .validform input {
        width: 60%;
        float: left;
    }
    .label_box input {
        width: auto;  float: none;
    }
</style>
</head>
<body>
    <div class="container">
        <div style="margin: 20px;">
            <form action="{{url($postUrl)}}" method="post" class="form-horizontal validform" id="cpform" name="cpform" role="form" autocomplete='off' >
                <input type='hidden' name='groupid' value="{{$item['groupid']}}" />
                <input type='hidden' name='is_system' value="0" />
                <table class="table table-border ticky_table">
                    <tr>
                        <td class="w_100"> <span class="red">*</span>{{L('membergroup_name')}}：</td>
                        <td><input type="text" id="name" name='name' value="{{$item.name}}"  class='form-control' datatype="zh" /></td>
                    </tr>
                    <tr>
                        <td class="w_100"> <span class="red">*</span>{{L('membergroup_experience')}}：</td>
                        <td><input type="text" id="experience" name='experience' value="{{$item.experience}}" class='form-control' datatype="n" /></td>
                    </tr>
                    <tr>
                        <td class="w_100"> <span class="red">*</span>{{L('membergroup_icon')}}：</td>
                        <td><input type="text" id="icon" name='icon' value="{{$item.icon}}" class='form-control'  datatype="*" /></td>
                    </tr>
                    <tr>
                        <td class="w_100"> <span class="red">*</span>{{L('membergroup_authority')}}：</td>
                        <td class="label_box">
                            <input type="checkbox" name="authority[]" value="1"  /> 发送消息
                            <input type="checkbox" name="authority[]" value="2" checked /> 发表评论
                            <input type="checkbox" name="authority[]" value="3"  /> 发表内容
                            <input type="checkbox" name="authority[]" value="4" checked /> 投稿免审核
                        </td>
                    </tr>
                    <tr>
                        <td class="w_100"> <span class="red">*</span>{{L('membergroup_description')}}：</td>
                        <td><input type="text" id="description" name='description' value="{{$item.description}}" class='form-control' datatype="*" /></td>
                    </tr>
                    <tr><td></td><td><input type="submit" name="dosubmit" class="btn btn-primary" value="提交" style="width: 54px;" /></td></tr>
                </table>
            </form>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $(".validform").Validform({
                tiptype: 3,
                showAllError: true,
                ajaxPost: true,
                callback: function (ret) {
                    if (ret.status == "y") {
                        parent.location.reload();
                    } else {
                        layer.msg(ret.info);
                    }
                }
            });
        });
    </script>
</body>
</html>
